DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{margin:0;padding:0}
        .header{
            background-color: pink;
            color:#fff;
            /* 行高可以将一段文本撑开,让文字在行高中居中 */
            line-height: 80px;
            /*
             text-align设置文本的对齐方式
             center|left|right
             */
            text-align: center;
        }
    </style>
</head>
<body>
    <div class="header"></div>
        hello world
    </div>
</body>
</html>